package com.fivebrms.hibernate.entity.model;

import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

@Entity
@Table(name="loginCredentials")
public class LoginForm implements Serializable
{
	@Id
	@GeneratedValue(strategy=GenerationType.AUTO )
	@Column(name="id" )
	private long id;
	@Column(name="login" )
	private String login;
	@Column(name="password" )
	private String password;
	@Column(name="dateCreated" )
	private Timestamp dateCreated;
	@Column(name="dateLastLogin" )
	private Timestamp dateLastLogin;

	
	public String getLogin()
    {
    	return login;
    }

	public void setLogin(String login)
    {
    	this.login = login;
    }

	public String getPassword()
    {
    	return password;
    }

	public void setPassword(String password)
    {
    	this.password = password;
    }

	public Timestamp getDateCreated()
    {
    	return dateCreated;
    }

	public void setDateCreated(Timestamp dateCreated)
    {
    	this.dateCreated = dateCreated;
    }

	public Timestamp getDateLastLogin()
    {
    	return dateLastLogin;
    }

	public void setDateLastLogin(Timestamp dateLastLogin)
    {
    	this.dateLastLogin = dateLastLogin;
    }

	public String toString()
	{
		return ToStringBuilder.reflectionToString(this);
	}

	public boolean equals(Object obj)
	{
		return EqualsBuilder.reflectionEquals(this, obj);
	}

	public int hashCode()
	{
		return HashCodeBuilder.reflectionHashCode(this);
	}
}
